program Five;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arrInteger = array of integer;

var
  mass: array of arrInteger;
  n, j, i: integer;

begin
  readln (n);
  setlength (mass, n);
  for i:= 0 to n-1 do
    setlength (mass[i], n);
  for i:= 0 to n-1 do
  begin
    mass[0][i]:=0;
    mass[i][0]:=1;
  end;
  for i:=1 to n-1 do
    for j:= 1 to i do
    begin
      mass[i][j]:=mass[i-1][j-1]+mass[i-1][j];
    end;
  for i:=0 to n-1 do
  begin
    for j:= 0 to i do
    begin
      write (mass[i][j]:4, ' ')
    end;
    writeln
  end;
  readln;
end.
